-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monkey patch GUI elements #151
Conversation
ping @pmrv |
pyiron_gui/monkey_patching.py
Outdated
if hasattr(cls, attr_name): | ||
warnings.warn( | ||
f"Class {cls.__name__} already has attribute {attr_name} - Aborting monkey path of gui elements." | ||
) | ||
else: | ||
setattr(cls, attr_name, value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might break in a similar way under reloading module has @jan-janssen pointed out in pyiron_base#808. I discussed a potential fix there also.
Co-authored-by: Marvin Poul <[email protected]>
@pmrv I now think this should be absolutely safe to reload. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Co-authored-by: Marvin Poul <[email protected]>
No description provided.